package com.ytjj.qmyx.mall.client;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.mall.model.FreightTemplateResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "ygyx-admin",contextId = "freightTemplateClient")
public interface FreightTemplateClient {
    @GetMapping("/product/freightTemplate/selectYxFreightTemplate")
    CommonResult<FreightTemplateResponse> selectFreightTemplateResponse(@RequestParam(value = "id") Integer id);

    /**
     * 根据商品id查询销售渠道的运费模板
     * @param productId
     * @return CommonResult<FreightTemplateResponse>
     */
    @GetMapping("/product/freightTemplate/selectYxFreightTemplateByProductId")
    CommonResult<FreightTemplateResponse> selectYxFreightTemplateByProductId(@RequestParam(value = "productId") Integer productId);

    /**
     * 根据商品id查询供应链的运费模板
     * @param productId
     * @return CommonResult<FreightTemplateResponse>
     */
    @GetMapping("/product/freightTemplate/selectChainFreightTemplateByProductId")
    CommonResult<FreightTemplateResponse> selectChainFreightTemplateByProductId(@RequestParam(value = "productId") Integer productId);

    @GetMapping("/product/freightTemplate/selectDefaultFreightTemplate")
    CommonResult<FreightTemplateResponse> selectDefaultFreightTemplate(@RequestParam(value = "platformData") String platformData);
}
